<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:composite="http://xmlns.jcp.org/jsf/composite">

    <h:body>
        <composite:interface>
            <composite:attribute name="bean" required="true"/>
        </composite:interface>

        <composite:implementation>
            <h:form id="keywordsFilterForm">
                <p:dialog id="keywordsFilterDialog" header="#{messages.Keywords}" modal="true" position="top" resizable="false" widgetVar="keywordsFilterDialog">
                    <p:panel id="keywordsFilterPanel" styleClass="noBorder noPadding noMargin">
                        <p:inputText id="keywordsInput" maxlength="100" required="true" value="#{cc.attrs.bean.keywords}" requiredMessage="#{messages.KeywordsRequired}" label="#{messages.Keywords}"></p:inputText>  
                        <p:watermark for="keywordsInput" value="#{messages.Keywords}" /> 
                        <p:commandButton value="#{messages.Add}" process="@parent" styleClass="blueBackgroundStrong" actionListener="#{cc.attrs.bean.addKeywords()}" oncomplete="if (args &amp;&amp; !args.validationFailed){PF('keywordsFilterDialog').hide();reinitWaypoint();}" update=":createSearchForm:searchGrowl :createSearchForm:searchPanel :facesPanel :totalFacesForm :createSearchForm:addFilterPanel" />
                        <p:commandButton value="#{messages.Cancel}" process="@this" styleClass="grayBackgroundStrong" style="margin-left: 3%;" actionListener="#{cc.attrs.bean.cancelKeywords()}" oncomplete="PF('keywordsFilterDialog').hide();"/>
                    </p:panel>
                </p:dialog>
            </h:form>
        </composite:implementation>
    </h:body>
</html>